package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"yangming-college/app/cms-college/cmd/v1/api/internal/config"
	"yangming-college/app/usercenter/cmd/v1/rpc/usercenter"
)

type ServiceContext struct {
	Config        config.Config
	UsercenterRpc usercenter.UserCenter
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,

		UsercenterRpc: usercenter.NewUserCenter(zrpc.MustNewClient(c.UserRpcConf)),
	}
}
